/*
 *  $TEAM_NAME Space Trader
 */
import models.Ship;
import models.TradeGood;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

/**
 * Tests the cargo hold of a ship
 * @author Bradley Wittenbrook
 * @version 1.0
 */
public class CargoHoldTest {
	/**
	 * gnat ship
	 */
	private final Ship ship = Ship.gnat();
	
	/**
	 * The Number 2
	 */
	
	private static final int TWO=2;

	/**
	 * Test to see if we can remove any good when none
	 * is added
	 */
    @Test
    public void removeWithNoGoods() {
    	for(TradeGood good : TradeGood.getTradeGoods()){
    		assertFalse("Remove goods with none available: ", 
    				ship.canRemoveTradeGood(good, 1));
    	}
    }

    /**
     * Test to see if we add one good if we can take it
     * away successfuly
     */
    @Test
    public void addGoods() {
    	final TradeGood good = TradeGood.FUR;
    	assertTrue("Add one fur: ", ship.canAddTradeGood(good, 1));
    	assertFalse("Take away two furs: ", ship.canRemoveTradeGood(good, TWO));
    	assertTrue("Take away the one fur: ", ship.canRemoveTradeGood(good, 1));
    }
}
